import java.math.BigInteger;


public class Decl implements Node{

	public String token = "<decl>";
	public Node id_list;
		
	public Decl(){
		
		int token = PSTree.Core_TK.getToken();	
		// check token is "int"
		if(token !=  4){
			System.out.println("Error: expecting \"int\" token in Decl");
			System.exit(1);
		}
		
		PSTree.Core_TK.skipToken(); // skip int token
		
		id_list = new Id_List();
		
		token = PSTree.Core_TK.getToken(); 
		// check token is ";"
		if(token !=  12){
			System.out.println("Error: expecting \";\" token in Decl");
			System.exit(1);
		}
		PSTree.Core_TK.skipToken(); // skip ; token
	}

	@Override
	public void print(int indent) {
		PSTree.print_ind(indent);
		System.out.print("int ");
		this.id_list.print(indent);
		System.out.println(";");
		
	}

	
	public void execute() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public BigInteger intexecute() {
		this.id_list.intexecute();
		return null;
	}

	@Override
	public boolean compexecute() {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public String Stringexcec() {
		// TODO Auto-generated method stub
		return null;
	}
}
